#/bin/bash

work_dir=$(pwd)

dmesg -c > /dev/null 2>&1
clear

make clean
make

if [ $? -ne 0 ]; then
    echo "make error"
    exit 1
fi

clear

cd ${work_dir}

insmod mod_ex1.ko

dmesg

rmmod mod_ex1.ko
